package com.guoby.utils;

import org.joda.time.DateTime;

/**
 * Created by pactera on 2018/3/12.
 */
public class Test
{
    public static void main(String[] args){

//        DateUtil dateUtil = new DateUtil();
        DateTime d = DateUtil.getTodayDate();
        System.out.println(d);

        DateUtil.getToday();


        System.out.println( DateUtil.getCurrentDate() );

        System.out.println("获取系统当前时间："+DateUtil.getCurrentTime());
        System.out.println(DateUtil.str2Date("2018-1-1"));
        System.out.println(DateUtil.formatDate("2018-11-12","yyyy-MM-dd", "yyyyMMdd"));
        System.out.println();

//        String strdate = "2018-03-21 18:00:00.0";
//        String a = DateUtil.str2Date("2018-03-21 18:00:00.0","yyyy-MM-dd HH:mm:ss").toString("yyyy-MM-dd HH:mm:ss");
//        System.out.println("转换结果："+a);
        String strdate = "2018-03-21 18:00:00.0";
        String b = strdate.substring(0,19);
        System.out.println("转换结果："+b);

    }
}
